const BaseModel = require('./base_model.js');

class DeviceDurationPricingModel extends BaseModel {}

DeviceDurationPricingModel.CL = "ax_device_duration_pricing";

DeviceDurationPricingModel.DB_STRUCTURE = {
  _pid: 'string|true',
  _id: 'string|true|comment=档位ID',
  deviceId: 'string|true|comment=设备ID',
  duration: 'int|true|comment=时长(分钟)',
  price: 'int|true|comment=价格(分)',
  discount: 'float|true|default=0|comment=折扣(0-1)',
  finalPrice: 'int|true|comment=最终价格(分)',
  description: 'string|false|comment=档位描述',
  
  // 状态管理
  status: 'int|true|default=1|comment=状态: 1-启用, 0-禁用',
  sortOrder: 'int|true|default=0|comment=排序顺序',
  
  createTime: 'int|true|comment=创建时间',
  updateTime: 'int|true|comment=更新时间',
};

DeviceDurationPricingModel.STATUS = {
  DISABLED: 0,  // 禁用
  ENABLED: 1    // 启用
};

module.exports = DeviceDurationPricingModel;
